<template>
  <view>
    <m-top
      :autoBack="true"
      :bgChangeByScroll="true"
      bgColor="#8C82FF"
      @getHeight="getGlHeight"
    >
      <view class="c333 font32 fw500">{{ title }}</view>
    </m-top>

    <m-container :top="glTop">
      <view class="pdv40">
        <view class="mgt40 font28 c666">
          <u-parse :content="content"></u-parse>
        </view>
      </view>
    </m-container>
  </view>
</template>

<script>
import GlTopMixin from "@/mixins/global-top";
import { getHomeNewDetailApi } from "@/api/modules/homepage.js";

export default {
  mixins: [GlTopMixin],
  data() {
    return {
      content: '',
      title: ''
    };
  },

  async onLoad(options) {
    const { id, title } = options;
    this.title = title
    uni.showLoading({
      title: "加载中",
    });
    try {
     const res =  await getHomeNewDetailApi({
        ti_id: id
      })
      this.content = res.ti_content || ''
    } catch (error) {}
    uni.hideLoading();
  },

  methods: {},
};
</script>

<style lang="scss" scoped>
.location {
  image {
    width: 24rpx;
    height: 32rpx;
  }
}
</style>
